﻿using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;

public class MovementSingleAsset : PlayableAsset, ITimelineClipAsset
{
    public MovementSingleBehaviour template;

    public ClipCaps clipCaps
    {
        get
        {
            return ClipCaps.None;
        }
    }

    public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
    {
        var playable = ScriptPlayable<MovementSingleBehaviour>.Create(graph, template);

        Debug.Log(owner.name);//放置PlayableDirector组件的对象

        //MovementSingleBehaviour behaviour = playable.GetBehaviour();

        return playable;
    }
}
